<!--suppress ALL -->
<template>
<div class="page maintain-page remainBuild-page" data-page="IndoorMap" style="z-index: 2">
	<div class="link-page-nav">
		<a href="#" class="link" @click=$root.backToTab()> 
			<i class="iconfont icon-zuo"></i>
		</a>
	</div>
	<div class="link-page-top" style="padding-bottom: 17px;">
		<div class="link-page-title">室内地图</div>
	</div>
	<div class="page-content" id="allBuildList_file" style="overflow: hidden;">
		<div class="area-change">
			<a href="#" class="popover-close"> 
				<span id="levelName">-</span> 
			</a>
		</div>
		<div class="area-list" style="padding: 0px;">
			<div id="eqmentFmap_map"></div>
			<div id="decter_layer_content"></div>
		</div>
	</div> 
	<div class="page-no-data">
		<span id="noData">暂无</span>
	</div>
</div>
</template>

<script>
	return {
		mounted() {

	    },
		data : function() {
			return {
				orgId:this.$route.params.organizationId,
				orgName:this.$route.params.organizationName,
				layeredGraphUrl:"",
				indoorId:"",
			}
		},
		methods : {
			// 筛选楼栋
			switchBuild:function() {
				var self = this;
				loadSelectBuildFun(self.orgId,function(data){
					jQuery(".page-no-data").hide();
					jQuery("#allBuildList_file").show();
					var buildId = data.buildId;
					var indoorId = data.indoorId;
					self.indoorId = indoorId;
					$("#levelName").html(data.buildName);
					self.layeredGraphUrl = data.layeredGraphUrl;
					jQuery("#eqmentFmap_map").empty();
					self.initFengMap();
				});
			},
			// 初始化蜂鸟图方法，
			initFengMap:function(){
				var self = this;
				jQuery("#eqmentFmap_map").show();
				int_MainFmap(self.orgId,1,"eqmentFmap_map",0,function(data){
					jQuery("#eqmentFmap_map").hide();
					if(self.layeredGraphUrl != ""){
						jQuery("#decter_layer_content").html(`
								<img width="100%" src="`+self.layeredGraphUrl+`" />
								`);
					} else {
						jQuery("#decter_layer_content").html(`
								<div class="no-data-img"><img src="`+listNoDataPic()+`"/></div>
								`);
					}
				}, self.indoorId);
			}
		},
		on : {
			pageInit : function(e, page) {
				var self = this;
				$("#levelName").html(self.orgName);
				self.initFengMap();
			},
			pageAfterIn : function(e, page) {
				var self = this;
			},
		}
	}
</script>
<style scoped>
	#eqmentFmap_map{
		width: 100%;
		height: 100%;
	}
	.page-no-data{
		height: 100%;
		background:rgba(241,241,241,1);
		position: relative;
		text-align: center;
	}
	#noData {
		font-size: 17px;
		font-family: PingFangSC-Regular;
		font-weight: 400;
		color: rgba(0,0,0,1);
		position: absolute;
		top: 35%;
	}
</style>